package com.woniuxy.springbootrabbit.kill;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class KillProducter {
    @Resource
    private AmqpTemplate amqpTemplate;

    public void send(String msg,String routingKey){
        amqpTemplate.convertAndSend("kill_exchange", routingKey, msg);
    }
}
